400
|
How can I display the column using currency format and enlarge the font for certain values
![](images/excomboboxq400.png)
with AxComboBox1 do
begin
with (Columns.Add('Currency') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
end;
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('9.94');
AddItem('11.94');
AddItem('1000');
end;
end
|
399
|
How can I get the number of occurrences of a specified string in the cell
![](images/excomboboxq399.png)
with AxComboBox1 do
begin
Columns.Add('');
with (Columns.Add('occurrences') as EXCOMBOBOXLib.Column) do
begin
ComputedField := 'lower(%0) count ''o''';
FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1 oooof the root');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
398
|
How can I display dates in my format
![](images/excomboboxq398.png)
with AxComboBox1 do
begin
with (Columns.Add('Date') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
end;
with Items do
begin
AddItem('1/21/2001');
AddItem('2/22/2002');
AddItem('3/13/2003');
AddItem('4/24/2004');
end;
end
|
397
|
How can I display dates in short format
![](images/excomboboxq397.png)
with AxComboBox1 do
begin
(Columns.Add('Date') as EXCOMBOBOXLib.Column).FormatColumn := 'shortdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
396
|
How can I display dates in long format
![](images/excomboboxq396.png)
with AxComboBox1 do
begin
(Columns.Add('Date') as EXCOMBOBOXLib.Column).FormatColumn := 'longdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
395
|
How can I display only the right part of the cell
![](images/excomboboxq395.png)
with AxComboBox1 do
begin
Columns.Add('');
with (Columns.Add('Right') as EXCOMBOBOXLib.Column) do
begin
ComputedField := '%0 right 2';
FormatColumn := '''"'' + value + ''"''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'SChild 3');
ExpandItem[h] := True;
end;
end
|
394
|
How can I display only the left part of the cell
![](images/excomboboxq394.png)
with AxComboBox1 do
begin
Columns.Add('');
(Columns.Add('Left') as EXCOMBOBOXLib.Column).ComputedField := '%0 left 2';
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'SChild 3');
ExpandItem[h] := True;
end;
end
|
393
|
How can I display true or false instead 0 and -1
![](images/excomboboxq393.png)
with AxComboBox1 do
begin
(Columns.Add('Boolean') as EXCOMBOBOXLib.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
with Items do
begin
AddItem(TObject(True));
AddItem(TObject(False));
AddItem(TObject(True));
AddItem(TObject(0));
AddItem(TObject(1));
end;
end
|
392
|
How can I display icons or images instead numbers
![](images/excomboboxq392.png)
with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (Columns.Add('Icons') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
end;
with Items do
begin
AddItem(TObject(1));
AddItem(TObject(2));
AddItem(TObject(3));
end;
end
|
391
|
How can I display the column using currency
![](images/excomboboxq391.png)
with AxComboBox1 do
begin
(Columns.Add('Currency') as EXCOMBOBOXLib.Column).FormatColumn := 'currency(dbl(value))';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
AddItem(TObject(5));
AddItem('10000.99');
end;
end
|
390
|
How can I display the currency only for not empty cells
![](images/excomboboxq390.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Currency') as EXCOMBOBOXLib.Column).ComputedField := 'len(%0) ? currency(dbl(%0)) : ''''';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
ItemBackColor[AddItem(Nil)] := $8080ff;
AddItem('10000.99');
end;
end
|
389
|
Is there a function to display the number of days between two date including the number of hours
![](images/excomboboxq389.png)
with AxComboBox1 do
begin
(Columns.Add('Start') as EXCOMBOBOXLib.Column).Width := 32;
Columns.Add('End');
(Columns.Add('Duration') as EXCOMBOBOXLib.Column).ComputedField := '2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '''' : str(=:1) + '' day(s)'') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? '' and '' : ''' +
''') + =:3 + '' hour(s)'' : '''' )';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[TObject(h),TObject(1)] := '1/14/2001';
h := AddItem('2/22/2002 12:00:00 PM');
CellCaption[TObject(h),TObject(1)] := '3/14/2002 1:00:00 PM';
h := AddItem('3/13/2003');
CellCaption[TObject(h),TObject(1)] := '4/11/2003 11:00:00 AM';
end;
end
|
388
|
Is there a function to display the number of days between two date including the number of hours
![](images/excomboboxq388.png)
with AxComboBox1 do
begin
Columns.Add('Start');
Columns.Add('End');
(Columns.Add('Duration') as EXCOMBOBOXLib.Column).ComputedField := '"D " + int(date(%1)-date(%0)) + " H " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[TObject(h),TObject(1)] := '1/14/2001 11:00:00 PM';
h := AddItem('2/22/2002 12:00:00 PM');
CellCaption[TObject(h),TObject(1)] := '3/14/2002 1:00:00 PM';
h := AddItem('3/13/2003');
CellCaption[TObject(h),TObject(1)] := '4/11/2003 11:00:00 AM';
end;
end
|
387
|
How can I display the number of days between two dates
![](images/excomboboxq387.png)
with AxComboBox1 do
begin
Columns.Add('Start');
Columns.Add('End');
(Columns.Add('Duration') as EXCOMBOBOXLib.Column).ComputedField := '(date(%1)-date(%0)) + '' days''';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[TObject(h),TObject(1)] := '1/14/2001';
h := AddItem('2/22/2002');
CellCaption[TObject(h),TObject(1)] := '3/14/2002';
h := AddItem('3/13/2003');
CellCaption[TObject(h),TObject(1)] := '4/11/2003';
end;
end
|
386
|
How can I get second part of the date
![](images/excomboboxq386.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Second') as EXCOMBOBOXLib.Column).ComputedField := 'sec(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:22 AM');
AddItem('3/13/2003 12:23:01 PM');
AddItem('4/14/2004 1:11:59 PM');
end;
end
|
385
|
How can I get minute part of the date
![](images/excomboboxq385.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Minute') as EXCOMBOBOXLib.Column).ComputedField := 'min(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:00 AM');
AddItem('3/13/2003 12:23:00 PM');
AddItem('4/14/2004 1:11:00 PM');
end;
end
|
384
|
How can I check the hour part only so I know it was afternoon
![](images/excomboboxq384.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('hour(%0)>=12',Nil).Bold := True;
Columns.Add('Date');
(Columns.Add('Hour') as EXCOMBOBOXLib.Column).ComputedField := 'hour(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
383
|
What about a function to get the day in the week, or days since Sunday
![](images/excomboboxq383.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('WeekDay') as EXCOMBOBOXLib.Column).ComputedField := 'weekday(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
382
|
Is there any function to get the day of the year or number of days since January 1st
![](images/excomboboxq382.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Day since January 1st') as EXCOMBOBOXLib.Column).ComputedField := 'yearday(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
381
|
How can I display only the day of the date
![](images/excomboboxq381.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Day') as EXCOMBOBOXLib.Column).ComputedField := 'day(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
380
|
How can I display only the month of the date
![](images/excomboboxq380.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Month') as EXCOMBOBOXLib.Column).ComputedField := 'month(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
379
|
How can I get only the year part from a date expression
![](images/excomboboxq379.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Year') as EXCOMBOBOXLib.Column).ComputedField := 'year(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
378
|
Can I convert the expression to date
![](images/excomboboxq378.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Date') as EXCOMBOBOXLib.Column).ComputedField := 'date(dbl(%0))';
with Items do
begin
AddItem('-1.98');
AddItem('30000.99');
AddItem('3561.23');
AddItem('1232.34');
end;
end
|
377
|
Can I convert the expression to a number, double or float
![](images/excomboboxq377.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Number + 2') as EXCOMBOBOXLib.Column).ComputedField := 'dbl(%0)+2';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
376
|
How can I display dates in long format
![](images/excomboboxq376.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('LongFormat') as EXCOMBOBOXLib.Column).ComputedField := 'longdate(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
375
|
How can I display dates in short format
![](images/excomboboxq375.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('ShortFormat') as EXCOMBOBOXLib.Column).ComputedField := 'shortdate(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
374
|
How can I display the time only of a date expression
![](images/excomboboxq374.png)
with AxComboBox1 do
begin
Columns.Add('Date');
(Columns.Add('Time') as EXCOMBOBOXLib.Column).ComputedField := '''time is:'' + time(date(%0))';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
373
|
Is there any function to display currencies, or money formatted as in the control panel
![](images/excomboboxq373.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Currency') as EXCOMBOBOXLib.Column).ComputedField := 'currency(dbl(%0))';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('10000.99');
end;
end
|
372
|
How can I convert the expression to a string so I can look into the date string expression for month's name
![](images/excomboboxq372.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Str') as EXCOMBOBOXLib.Column).ComputedField := 'str(%0) + '' AA''';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
371
|
Can I display the absolute value or positive part of the number
![](images/excomboboxq371.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Abs') as EXCOMBOBOXLib.Column).ComputedField := 'abs(%0)';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
370
|
Is there any function to get largest number with no fraction part that is not greater than the value
![](images/excomboboxq370.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Floor') as EXCOMBOBOXLib.Column).ComputedField := 'floor(%0)';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
369
|
Is there any function to round the values base on the .5 value
![](images/excomboboxq369.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Round') as EXCOMBOBOXLib.Column).ComputedField := 'round(%0)';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
368
|
How can I get or display the integer part of the cell
![](images/excomboboxq368.png)
with AxComboBox1 do
begin
Columns.Add('Number');
(Columns.Add('Int') as EXCOMBOBOXLib.Column).ComputedField := 'int(%0)';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
367
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
![](images/excomboboxq367.png)
with AxComboBox1 do
begin
(Columns.Add('') as EXCOMBOBOXLib.Column).ComputedField := 'proper(%0)';
with Items do
begin
h := AddItem('root');
InsertItem(h,Nil,'child child');
InsertItem(h,Nil,'child child');
InsertItem(h,Nil,'child child');
ExpandItem[h] := True;
end;
end
|
366
|
Is there any option to display cells in uppercase
![](images/excomboboxq366.png)
with AxComboBox1 do
begin
(Columns.Add('') as EXCOMBOBOXLib.Column).ComputedField := 'upper(%0)';
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Chld 3');
ExpandItem[h] := True;
end;
end
|
365
|
Is there any option to display cells in lowercase
![](images/excomboboxq365.png)
with AxComboBox1 do
begin
(Columns.Add('') as EXCOMBOBOXLib.Column).ComputedField := 'lower(%0)';
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Chld 3');
ExpandItem[h] := True;
end;
end
|
364
|
How can I mark the cells that has a specified type, ie strings only
![](images/excomboboxq364.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('type(%0) = 8',Nil).ForeColor := $ff;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,TObject(2));
InsertItem(h,Nil,'Chld 3');
ExpandItem[h] := True;
end;
end
|
363
|
How can I bold the items that contains data or those who displays empty strings
![](images/excomboboxq363.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('not len(%1)=0',Nil).Bold := True;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
hC := InsertItem(h,Nil,'Child 2');
CellCaption[TObject(hC),TObject(1)] := '1';
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
362
|
Can I change the background color for items or cells that contains a specified string
![](images/excomboboxq362.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('%0 contains ''hi''',Nil).BackColor := $ff;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Chld 3');
ExpandItem[h] := True;
end;
end
|
361
|
Is there any option to change the fore color for cells or items that ends with a specified string
![](images/excomboboxq361.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('%0 endwith ''22''',Nil).ForeColor := $ff;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 1.22');
InsertItem(h,Nil,'Child 2.22');
ExpandItem[h] := True;
end;
end
|
360
|
How can I highlight the cells or items that starts with a specified string
![](images/excomboboxq360.png)
with AxComboBox1 do
begin
ConditionalFormats.Add('%0 startwith ''C''',Nil).Underline := True;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'SChild 3');
ExpandItem[h] := True;
end;
end
|
359
|
How can I change the background color or the visual appearance using ebn for a particular column
![](images/excomboboxq359.png)
with AxComboBox1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
with Columns do
begin
Add('Column 1');
(Add('Column 2') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exHeaderBackColor] := TObject(16777216);
(Add('Column 3') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exHeaderBackColor] := TObject(16777471);
Add('Column 4');
end;
end
|
358
|
How can I change the background color for a particular column
![](images/excomboboxq358.png)
with AxComboBox1 do
begin
with Columns do
begin
Add('Column 1');
(Add('Column 2') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exHeaderBackColor] := TObject(8439039);
Add('Column 3');
end;
end
|
357
|
Does your control support prompt feature
![](images/excomboboxq357.png)
with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
AutoComplete := False;
(Columns.Add('Column 1') as EXCOMBOBOXLib.Column).Prompt := '<img>1</img><i><fgcolor=808080>type to search</fgcolor></i>';
Items.AddItem(TObject(0));
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
end
|
356
|
How can I display the column's header using multiple lines
![](images/excomboboxq356.png)
with AxComboBox1 do
begin
HeaderHeight := 128;
HeaderSingleLine := False;
(Columns.Add('This is just a column that should break the header.') as EXCOMBOBOXLib.Column).Width := 32;
Columns.Add('This is just another column that should break the header.');
end
|
355
|
How can I sort the value gets listed in the drop down filter window
![](images/excomboboxq355.png)
with AxComboBox1 do
begin
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
MarkSearchColumn := False;
set_Description(EXCOMBOBOXLib.DescriptionTypeEnum.exFilterBarAll,'');
set_Description(EXCOMBOBOXLib.DescriptionTypeEnum.exFilterBarBlanks,'');
set_Description(EXCOMBOBOXLib.DescriptionTypeEnum.exFilterBarNonBlanks,'');
with (Columns.Add('P1') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc;
end;
with (Columns.Add('P2') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := EXCOMBOBOXLib.FilterListEnum.exSortItemsAsc;
end;
with Items do
begin
h := AddItem('Z3');
CellCaption[TObject(h),TObject(1)] := 'C';
CellCaption[TObject(InsertItem(h,Nil,'Z1')),TObject(1)] := 'B';
CellCaption[TObject(InsertItem(h,Nil,'Z2')),TObject(1)] := 'A';
ExpandItem[h] := True;
end;
end
|
354
|
Is there any property to disable the popup/context menu being shown when the user does a right click in the control's label area
![](images/excomboboxq354.png)
with AxComboBox1 do
begin
(Columns.Add('Default') as EXCOMBOBOXLib.Column).AllowEditContextMenu := False;
Items.AddItem(TObject(0));
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
end
|
353
|
How can I align the text/caption on the scroll bar
![](images/excomboboxq353.png)
with AxComboBox1 do
begin
set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,'left');
set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,EXCOMBOBOXLib.AlignmentEnum.LeftAlignment);
set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,'right');
set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,EXCOMBOBOXLib.AlignmentEnum.RightAlignment);
ColumnAutoResize := False;
Columns.Add(1);
Columns.Add(2);
Columns.Add(3);
Columns.Add(4);
Columns.Add(5);
Columns.Add(6);
end
|
352
|
Does you control support RTL languages or if there is a property RightToLeft
![](images/excomboboxq352.png)
with AxComboBox1 do
begin
RightToLeft := True;
ItemsAllowSizing := EXCOMBOBOXLib.ItemsAllowSizingEnum.exResizeItem;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exHLines;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
ScrollBySingleLine := True;
DefaultItemHeight := 64;
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
Alignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
HeaderAlignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
EditAlignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
end;
with Items do
begin
AddItem('Item 1');
ItemHeight[InsertItem(AddItem('Parent'),Nil,'Item 2')] := 48;
AddItem('Item 3');
ExpandItem[ItemByIndex[1]] := True;
end;
end
|
351
|
How do I enable resizing all the items at runtime
![](images/excomboboxq351.png)
with AxComboBox1 do
begin
ItemsAllowSizing := EXCOMBOBOXLib.ItemsAllowSizingEnum.exResizeAllItems;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exHLines;
Columns.Add('Column');
Items.AddItem('Item 1');
with Items do
begin
ItemHeight[AddItem('Item 2')] := 48;
end;
Items.AddItem('Item 3');
end
|
350
|
How can I remove the filter
![](images/excomboboxq350.png)
with AxComboBox1 do
begin
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exBlanks;
end;
ApplyFilter();
ClearFilter();
end
|
349
|
How do I display the icons being selected in the control's label
![](images/excomboboxq349.png)
with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Column');
with Items do
begin
CellImage[TObject(AddItem('Image 1')),TObject(0)] := 1;
CellImage[TObject(AddItem('Image 2')),TObject(0)] := 2;
CellImage[TObject(AddItem('Image 3')),TObject(0)] := 3;
end;
set_AssignEditImageOnSelect(0,True);
Value := 'Image 2';
end
|
348
|
How do I select a value
![](images/excomboboxq348.png)
with AxComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
Value := 'Root 1.1';
end
|
347
|
How do I select a value
![](images/excomboboxq347.png)
with AxComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
set_Select(TObject(1),'Root 1.2');
end
|
346
|
How do change the visual appearance for the drop down border, using EBN
![](images/excomboboxq346.png)
with AxComboBox1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
DropDownBorder := EXCOMBOBOXLib.AppearanceEnum($1000000);
end
|
345
|
How do I remove the drop down's border
![](images/excomboboxq345.png)
with AxComboBox1 do
begin
DropDownBorder := EXCOMBOBOXLib.AppearanceEnum.None2;
end
|
344
|
How can I change the foreground color for edit controls
![](images/excomboboxq344.png)
with AxComboBox1 do
begin
ForeColorEdit := Color.FromArgb(255,0,0);
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
set_Select(TObject(0),'Root 1.1');
end
|
343
|
How can I change the background color for edit controls
![](images/excomboboxq343.png)
with AxComboBox1 do
begin
BackColorEdit := Color.FromArgb(255,0,0);
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
set_Select(TObject(0),'Root 1.1');
end
|
342
|
How can I hide the drop down buttons when the control loses the focus
![](images/excomboboxq342.png)
with AxComboBox1 do
begin
HideDropDownButton := True;
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
end
|
341
|
How can I ensure that the drop down portions doesn't show partial items
![](images/excomboboxq341.png)
with AxComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
end
|
340
|
How can I close the drop down window when user double clicks it
![](images/excomboboxq340.png)
with AxComboBox1 do
begin
CloseOnDblClk := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
end
|
339
|
How do I get the handle of the drop down window
![](images/excomboboxq339.png)
with AxComboBox1 do
begin
Columns.Add(AxComboBox1.hWndDropDown);
end
|
338
|
How do I specify the height of the control's label
![](images/excomboboxq338.png)
with AxComboBox1 do
begin
LabelHeight := 34;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
337
|
The control selects the portion of text that doesn't match with the selected item. How can I avoid that
![](images/excomboboxq337.png)
with AxComboBox1 do
begin
AutoSelect := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
336
|
How can I show the drop down window as soon as user starts typing in the control
![](images/excomboboxq336.png)
with AxComboBox1 do
begin
AutoDropDown := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
335
|
How do I change the text in the edit or label area
![](images/excomboboxq335.png)
with AxComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
set_EditText(TObject(0),'Test');
end
|
334
|
How do I lock or make read-only the control
![](images/excomboboxq334.png)
with AxComboBox1 do
begin
Locked := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
333
|
How do I let user to resize only the height of the drop down window, at runtime
![](images/excomboboxq333.png)
with AxComboBox1 do
begin
AllowSizeGrip := True;
AllowHResize := False;
MinWidthList := 100;
MinHeightList := 100;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
332
|
How do I let user to resize only the width of the drop down window, at runtime
![](images/excomboboxq332.png)
with AxComboBox1 do
begin
AllowSizeGrip := True;
AllowVResize := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
331
|
How do I let user to resize the drop down window, at runtime
![](images/excomboboxq331.png)
with AxComboBox1 do
begin
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
330
|
How do I specify the height of the drop down window
![](images/excomboboxq330.png)
with AxComboBox1 do
begin
set_HeightList(Nil,400);
MinWidthList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
329
|
How do I specify the minimum height of the drop down window
![](images/excomboboxq329.png)
with AxComboBox1 do
begin
MinHeightList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
328
|
How do I specify the width of the drop down window
![](images/excomboboxq328.png)
with AxComboBox1 do
begin
set_WidthList(Nil,100);
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
327
|
How do I specify the minimum width of the drop down window
![](images/excomboboxq327.png)
with AxComboBox1 do
begin
MinWidthList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
326
|
I have multiple columns, how can I display a single edit in the control's label
![](images/excomboboxq326.png)
with AxComboBox1 do
begin
SingleEdit := True;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
CellCaption[TObject(AddItem('Item 1')),TObject(1)] := 'SubItem 1';
CellCaption[TObject(AddItem('Item 2')),TObject(1)] := 'SubItem 2';
CellCaption[TObject(AddItem('Item 3')),TObject(1)] := 'SubItem 3';
end;
end
|
325
|
How do I turn off the auto complete feature
![](images/excomboboxq325.png)
with AxComboBox1 do
begin
AutoComplete := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
324
|
The control supports three styles: Simple, DropDown and DropDownList. How can I change the style
![](images/excomboboxq324.png)
with AxComboBox1 do
begin
Style := EXCOMBOBOXLib.StyleEnum.DropDownList;
end
|
323
|
Is there any option to align the header to the left and the data to the right
![](images/excomboboxq323.png)
with AxComboBox1 do
begin
(Columns.Add('Left') as EXCOMBOBOXLib.Column).Alignment := EXCOMBOBOXLib.AlignmentEnum.LeftAlignment;
with (Columns.Add('Right') as EXCOMBOBOXLib.Column) do
begin
Alignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
HeaderAlignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
EditAlignment := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
end;
with Items do
begin
CellCaption[TObject(AddItem('left')),TObject(1)] := 'right';
end;
end
|
322
|
How do I change the control's border, using your EBN files
![](images/excomboboxq322.png)
with AxComboBox1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Appearance := EXCOMBOBOXLib.AppearanceEnum($1000000);
end
|
321
|
Can I change the default border of the tooltip, using your EBN files
![](images/excomboboxq321.png)
with AxComboBox1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exToolTipAppearance,$1000000);
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
320
|
Can I change the background color for the tooltip
![](images/excomboboxq320.png)
with AxComboBox1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exToolTipBackColor,$ff);
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
319
|
Does the tooltip support HTML format
![](images/excomboboxq319.png)
with AxComboBox1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := '<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>';
end
|
318
|
Can I change the forecolor for the tooltip
![](images/excomboboxq318.png)
with AxComboBox1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exToolTipForeColor,$ff);
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
317
|
Can I change the foreground color for the tooltip
![](images/excomboboxq317.png)
with AxComboBox1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := '<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>';
end
|
316
|
How can I merge cells
![](images/excomboboxq316.png)
with AxComboBox1 do
begin
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exAllLines;
MarkSearchColumn := False;
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := AddItem('this cell merges the first two columns');
CellMerge[TObject(h),TObject(0)] := TObject(1);
h := AddItem(Nil);
CellCaption[TObject(h),TObject(1)] := 'this cell merges the last two columns';
CellMerge[TObject(h),TObject(1)] := TObject(2);
h := AddItem('this cell merges the all three columns');
CellMerge[TObject(h),TObject(0)] := TObject(1);
CellMerge[TObject(h),TObject(0)] := TObject(2);
h := AddItem('this draws a divider item');
ItemDivider[h] := 0;
end;
end
|
315
|
How can I merge cells
![](images/excomboboxq315.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem('This is bit of text merges all cells in the item');
ItemDivider[h] := 0;
CellHAlignment[TObject(h),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
end;
end
|
314
|
How can I change the color for separator / dividers items
![](images/excomboboxq314.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
ScrollBySingleLine := False;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem(Nil);
ItemDivider[h] := 0;
ItemDividerLine[h] := EXCOMBOBOXLib.DividerLineEnum.DoubleDotLine;
ItemDividerLineAlignment[h] := EXCOMBOBOXLib.DividerAlignmentEnum.DividerCenter;
ItemHeight[h] := 6;
SelectableItem[h] := False;
h := AddItem('Cell 2');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
end;
end
|
313
|
How can I add separator - dividers items
![](images/excomboboxq313.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
ScrollBySingleLine := False;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem(Nil);
ItemDivider[h] := 0;
ItemDividerLine[h] := EXCOMBOBOXLib.DividerLineEnum.DoubleDotLine;
ItemDividerLineAlignment[h] := EXCOMBOBOXLib.DividerAlignmentEnum.DividerCenter;
ItemHeight[h] := 6;
SelectableItem[h] := False;
h := AddItem('Cell 2');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
end;
end
|
312
|
Can I change the style of the line being displayed by a divider item
![](images/excomboboxq312.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
ScrollBySingleLine := False;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem('This is bit of text that''s displayed on the entire item, divider.');
ItemDivider[h] := 0;
ItemDividerLine[h] := EXCOMBOBOXLib.DividerLineEnum.DoubleDotLine;
CellHAlignment[TObject(h),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
ItemHeight[h] := 24;
end;
end
|
311
|
Can I remove the line being displayed by a divider item
![](images/excomboboxq311.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem('This is bit of text that''s displayed on the entire item, divider.');
ItemDivider[h] := 0;
ItemDividerLine[h] := EXCOMBOBOXLib.DividerLineEnum.EmptyLine;
CellHAlignment[TObject(h),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
end;
end
|
310
|
How can I display a divider item, merging all cells
![](images/excomboboxq310.png)
with AxComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
h := AddItem('This is bit of text that''s displayed on the entire item, divider.');
ItemDivider[h] := 0;
CellHAlignment[TObject(h),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
end;
end
|
309
|
How can I fix or lock items
![](images/excomboboxq309.png)
with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib.VAlignmentEnum.exTop] := 1;
CellCaption[TObject(LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exTop,0]),TObject(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exTop,0]] := $bac4c4;
LockedItemCount[EXCOMBOBOXLib.VAlignmentEnum.exBottom] := 2;
CellCaption[TObject(LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exBottom,0]),TObject(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exBottom,0]] := $bac4c4;
CellCaption[TObject(LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exBottom,1]),TObject(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exBottom,1]] := $bababa;
end;
end
|
308
|
How can I fix or lock an item on the bottom side of the control
![](images/excomboboxq308.png)
with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib.VAlignmentEnum.exBottom] := 1;
CellCaption[TObject(LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exBottom,0]),TObject(0)] := 'This is a locked item, fixed to the bottom side of the control.';
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
307
|
How can I fix or lock an item on the top of the control
![](images/excomboboxq307.png)
with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib.VAlignmentEnum.exTop] := 1;
CellCaption[TObject(LockedItem[EXCOMBOBOXLib.VAlignmentEnum.exTop,0]),TObject(0)] := 'This is a locked item, fixed to the top side of the control.';
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
306
|
Is there any function to limit the height of the items when I display it using multiple lines
![](images/excomboboxq306.png)
with AxComboBox1 do
begin
ScrollBySingleLine := True;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[TObject(h),TObject(1)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
ItemMaxHeight[h] := 48;
end;
end
|
305
|
Why I cannot center my cells in the column
![](images/excomboboxq305.png)
with AxComboBox1 do
begin
TreeColumnIndex := -1;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exRowLines;
(Columns.Add('Default') as EXCOMBOBOXLib.Column).Alignment := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
Items.AddItem('item 1');
Items.AddItem('item 2');
Items.AddItem('item 3');
end
|
304
|
How can I align the cell to the left, center or to the right
![](images/excomboboxq304.png)
with AxComboBox1 do
begin
TreeColumnIndex := -1;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exRowLines;
Columns.Add('Default');
with Items do
begin
CellHAlignment[TObject(AddItem('left')),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.LeftAlignment;
CellHAlignment[TObject(AddItem('center')),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
CellHAlignment[TObject(AddItem('right')),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.RightAlignment;
end;
end
|
303
|
How do I apply HTML format to a cell
![](images/excomboboxq303.png)
with AxComboBox1 do
begin
TreeColumnIndex := -1;
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
set_HTMLPicture('p1','c:\exontrol\images\zipdisk.gif');
set_HTMLPicture('p2','c:\exontrol\images\auction.gif');
Columns.Add('Default');
with Items do
begin
h := AddItem('The following item shows some of the HTML format supported:');
CellHAlignment[TObject(h),TObject(0)] := EXCOMBOBOXLib.AlignmentEnum.CenterAlignment;
h := AddItem('<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u' +
'>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor' +
'</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ');
CellCaptionFormat[TObject(h),TObject(0)] := EXCOMBOBOXLib.CaptionFormatEnum.exHTML;
CellSingleLine[TObject(h),TObject(0)] := EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap;
end;
end
|
302
|
How can I change the font for a cell
![](images/excomboboxq302.png)
with AxComboBox1 do
begin
Columns.Add('Default');
Items.AddItem('std font');
with Items do
begin
CellCaptionFormat[TObject(AddItem('this <font tahoma;12>is a bit of text with</font> a different font')),TObject(0)] := EXCOMBOBOXLib.CaptionFormatEnum.exHTML;
end;
end
|
301
|
How can I change the font for a cell
![](images/excomboboxq301.png)
with AxComboBox1 do
begin
Columns.Add('Default');
Items.AddItem('default font');
f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont);
with f do
begin
Name := 'Tahoma';
Size := 12;
end;
with Items do
begin
CellFont[TObject(AddItem('new font')),TObject(0)] := (f as stdole.StdFont);
end;
end
|